The Introduce Variable refactoring helps you to simplify complicated statements in your code. For example, in the following code fragment:
  ((JComponent)getContentPane()).setBorder(
      BorderFactory.createEmptyBorder(10, 10, 5, 10));
you may select the "BorderFactory.createEmptyBorder(10, 10, 5, 10)" string and invoke the Refactoring | Introduce Variable... main menu item (Ctrl-Alt-V). Here is the resulting code fragment:
  Border border = BorderFactory.createEmptyBorder(10, 10, 5, 10);
  ((JComponent)getContentPane()).setBorder(border);